import request from '@/utils/request'

// 查询工单与工作项的关联列表
export function listTicketWorkRelation(query) {
  return request({
    url: '/project/ticketWorkRelation/list',
    method: 'get',
    params: query
  })
}

// 查询工单与工作项的关联详细
export function getTicketWorkRelation(relationId) {
  return request({
    url: '/project/ticketWorkRelation/' + relationId,
    method: 'get'
  })
}

// 新增工单与工作项的关联
export function addTicketWorkRelation(data) {
  return request({
    url: '/project/ticketWorkRelation',
    method: 'post',
    data: data
  })
}

// 修改工单与工作项的关联
export function updateTicketWorkRelation(data) {
  return request({
    url: '/project/ticketWorkRelation',
    method: 'put',
    data: data
  })
}

// 删除工单与工作项的关联
export function delTicketWorkRelation(relationId) {
  return request({
    url: '/project/ticketWorkRelation/' + relationId,
    method: 'delete'
  })
}
